package com.gvitz.transaction.activities;


import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.gvitz.transaction.R;



public class BillActivity extends GVActivity  {
	/** Activity con el acerca de gvitz */
   
	@Override
	public void onCreate(Bundle savedInstanceState) {
         
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_bill);
        
        Bundle extras = getIntent().getExtras(); 
        
        
		TextView id = (TextView) findViewById(R.id.transaccion_bill);
		TextView monto = (TextView) findViewById(R.id.monto_bill);
		TextView fecha = (TextView) findViewById(R.id.date_bill);
		TextView des = (TextView) findViewById(R.id.descripcion_bill);
		TextView tarjeta = (TextView) findViewById(R.id.card_bill);
		TextView comercio = (TextView) findViewById(R.id.comercio_bill);
		Button btn = (Button) findViewById(R.id.button_bill_menu);
		
		if (id != null) {
			 id.setText("000000"+ extras.getString("id"));
		}
		
		if (monto != null) {
			 monto.setText("$"+ extras.getString("monto"));
		}
		
		if (des != null) {
			 des.setText(extras.getString("descripcion"));
		}
		
		if (tarjeta != null) {
			 tarjeta.setText("**** **** **** " + extras.getString("tarjeta"));
		}
		
		if (fecha != null) {
			 fecha.setText(extras.getString("fecha"));
		}
		
		if (comercio != null) {
			 comercio.setText(extras.getString("comercio"));
		}
		
			 btn.setOnClickListener(new View.OnClickListener() {
			     @Override
			     public void onClick(View view) {
						Intent i = new Intent(BillActivity.this, MainActivity.class);
						startActivity(i);
						finish();
			     }
			 });
		
	}
	
	}
         
   	